var conf=require('../config');
var ObjectId = conf.ObjectId;
var UserSchema =new conf.Schema({
  userName:String,
  mobile:String,//手机
  email:String,
  password:String
});

UserSchema.index({mobile:1},{"background" : true});//设置索引
var UserEntity = conf.mongoose.model('UserEntity',UserSchema,'user');//指定在数据库中的collection名称为user
exports.UserEntity  = UserEntity;//导出实体

var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});

module.exports = router;
